package com.design.pattern.observer.context;

import java.util.Observable;

/**
 * 消息推送环境类
 * 其实还可以继续往接口上抽取，但是为了简单就不抽取了。
 */
public class OauthPushSubscribeContext extends Observable {
    private static OauthPushSubscribeContext instance=new OauthPushSubscribeContext();

    private OauthPushSubscribeContext() {

    }

    /**
     * 最简单的单例
     * @return
     */
    public static OauthPushSubscribeContext getInstance() {
        return instance;
    }

    @Override
    public void notifyObservers(Object arg) {
        super.setChanged();
        super.notifyObservers(arg);
    }
}
